Skip to content

Feature/819 store error messages#827

Merged
kevinwallimann merged 9 commits intodevelopfrom
feature/819-store-error-messages
Jan 12, 2024
Merged

Feature/819 store error messages#827
kevinwallimann merged 9 commits intodevelopfrom
feature/819-store-error-messages

Conversation

@kevinwallimann
Copy link
Copy Markdown
Collaborator

Closes #819

How it was tested locally:

application.properties changed properties:

notification.enabled=true
notification.sender.address=<redacted>
spring.mail.host=<redacted>
spring.mail.port=<redacted>
spring.mail.properties[mail.smtp.connectiontimeout]=5000
spring.mail.properties[mail.smtp.timeout]=5000
spring.mail.properties[mail.smtp.writetimeout]=5000

sparkYarnSink.hadoopResourceManagerUrlBase=http://<redacted.:8088

db.driver=org.postgresql.Driver
db.url=jdbc:postgresql://localhost:5432/hyperdriver
db.user=hyperdriver
db.password=hyperdriver
  • Create dummy workflow, click run
  • Job Instance should be stuck in Submitting status.
  • Create a suitable notification rule (E.g. receive for all projects and prefixes). Don’t forget to activate it
  • Copy a real executor job id from the test system and copy it to your job instance. Also set the job status to ‘Running’. E.g.
    UPDATE job_instance SET (job_status, executor_job_id) VALUES (‘Running’,<real-executor-job-id>) WHERE id = <your-local-job-instance-id>
  • Refresh job instance table (directly in DB), see stack trace filled in the diagnostics column of your job instance.
  • Wait a couple of minutes, receive e-mail notification with stacktrace.

I did it both for failed and successful runs, and also for a failed run whose application page was already empty

After these tests were finished, finally I executed

CALL archive_dag_instances(
        i_to_ts => now()::timestamp,
        i_max_records => 200000,
        i_chunk_size => 10000
     );

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

val diagnosticsOpt = failedJob.flatMap(_.diagnostics)
val causes = diagnosticsOpt
.map { diagnostics =>
causedByPattern
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one is overkill. I would just add whole text within diagnosticsOpt.

@kevinwallimann kevinwallimann merged commit 03fca8e into develop Jan 12, 2024
@kevinwallimann kevinwallimann deleted the feature/819-store-error-messages branch January 12, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Store and send error message of failed applications

2 participants